<!--
 * @Author: your name
 * @Date: 2020-12-27 12:48:22
 * @LastEditTime: 2021-03-26 12:31:49
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \white-jotter-blog-vue\src\components\content\SearchBar.vue
-->
<template>
  <div style="margin-bottom: 30px; display: flex; justify-content: center; align-items: center">
    <el-input @keyup.enter.native="searchClick" placeholder="文章摘要搜索..." prefix-icon="el-icon-search" size="small" style="width: 400px; margin-right: 10px" v-model="keyword" clearable> </el-input>
    <el-button size="small" type="primary" icon="el-icon-search" @click="searchClick">搜索</el-button>
  </div>
</template>

<script>
export default {
  name: "SearchBar",
  data() {
    return {
      keyword: "",
      books: [],
      cardLoading: [],
    };
  },
  methods: {
    searchClick() {
      this.$emit("onSearch");
    },
  },
};
</script>

<style scoped></style>
